{{extend 'layout.html'}}

<h1>Evaluation</h1>

<h3>Assignment: {{=venue_link}}</h3>

<div><table>
  <tr><td style="font-weight:bold">Author</td><td>:</td>
  <td><div>{{=username}}</div></td><td></td></tr>
{{if subm is not None:}}
  <tr><td style="font-weight:bold">Date Created</td><td>:</td>
  <td><div>{{=subm.date_created}} UTC</div></td><td></td></tr>
  <tr><td style="font-weight:bold">Date Updated</td><td>:</td>
  <td><div>{{=subm.date_updated}} UTC</div></td><td></td></tr>
{{pass}}

{{if percentile:}}
  <tr><td style="font-weight:bold">Submission quality percentile</td><td>:</td>
  <td><div>{{=percentile}}
    {{if ranking_link:}}
    ({{=ranking_link}})
    {{pass}}
  </div></td><td></td></tr>
{{pass}}
{{if review_accuracy:}}
  <tr><td style="font-weight:bold">Author's review accuracy</td><td>:</td>
  <td><div>{{=review_accuracy}}
    {{if reviews_link:}}
    ({{=reviews_link}})
    {{pass}}
</div></td><td></td></tr>
{{pass}}
{{if is_admin and user_reputation:}}
  <tr><td style="font-weight:bold">Author's reputation</td><td>:</td>
  <td><div>{{=user_reputation}}</div></td><td></td></tr>
{{pass}}
{{if final_grade:}}
  <tr><td style="font-weight:bold">Overall grade</td><td>:</td>
  <td><div>{{=final_grade}}</div></td><td></td></tr>
{{pass}}  
  
{{if subm is not None:}}  
  <tr><td style="font-weight:bold">N. reviews with evaluation</td><td>:</td>
  <td><div>{{=subm.n_completed_reviews}}</div></td><td></td></tr>
  <tr><td style="font-weight:bold">N. reviews without evaluation</td><td>:</td>
  <td><div>{{=subm.n_rejected_reviews}}</div></td><td></td></tr>
{{pass}}

{{if subm_link:}}
  <tr><td style="font-weight:bold">Submitted link</td><td>:</td>
  <td><div>{{=subm_link}}</div></td><td></td></tr>
{{pass}}
</table></div>

{{ if subm_feedback or edit_feedback_link:}}
<h3>Feedback from instructor/TA</h3>
{{=subm_feedback}}
{{if edit_feedback_link:}}
	<p>{{=edit_feedback_link}}</p>
{{pass}}
{{pass}}

{{ if subm_comment:}}
  <h3>Submission</h3>
  {{=subm_comment}}
{{pass}}
{{if subm is not None and subm.content:}}
{{=download_link}}
{{pass}}

{{if subm is not None:}}
<h3>Comments received</h3>
{{=grid}}
{{pass}}

{{if request.is_local:}}
{{=response.toolbar()}}
{{pass}}
